using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.ConnectionEngine.Registers.Health.Patient.Common
{
    public class Names : List<Name>
    {
        public Names()
        { }
    }


    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/PatientRegister")]
    public class Name
    {
        public Name()
        { }

        bool primaryAlias;
        public bool PrimaryAlias
        {
            get { return primaryAlias; }
            set { primaryAlias = value; }
        }

        string familyName;
        public string FamilyName
        {
            get { return familyName; }
            set { familyName = value; }
        }

        string givenName1;
        public string GivenName1
        {
            get { return givenName1; }
            set { givenName1 = value; }
        }

        string givenName2;
        public string GivenName2
        {
            get { return givenName2; }
            set { givenName2 = value; }
        }

        string givenName3;
        public string GivenName3
        {
            get { return givenName3; }
            set { givenName3 = value; }
        }

        int preferredGivenNameIndex;
        public int PreferredGivenNameIndex
        {
            get { return preferredGivenNameIndex; }
            set { preferredGivenNameIndex = value; }
        }

        string title;
        public string Title
        {
            get { return title; }
            set { title = value; }
        }

        NameStatus status = NameStatus.none;
        public NameStatus Status
        {
            get { return status; }
            set { status = value; }
        }

        public Name(string sTitle,
                    string sFamilyName,
                    string sGivenName1,
                    string sGivenName2,
                    string sGivenName3,
                    int iPreferredGivenNameIndex,
                    bool bPrimaryAlias)
        {
            this.FamilyName = sFamilyName;
            this.GivenName1 = sGivenName1;
            this.GivenName2 = sGivenName2;
            this.GivenName3 = sGivenName3;
            this.PreferredGivenNameIndex = iPreferredGivenNameIndex;
            this.PrimaryAlias = bPrimaryAlias;
            this.Title = sTitle;
        }
    }

    public enum NameStatus
    {
        update,
        insert,
        none
    }
}
